﻿/********************************************************************************************************************
* Author:	Christos Polydorou																						*
* Email:	std04237@di.uoa.gr																						*
* Purpose:	This script is used in order to create the "Entity-Attribute" table that connects each entity with	the	*
*			attributes of the category and their values.															*
********************************************************************************************************************/

CREATE TABLE [dbo].[Entity-Attribute]
(
	Entity bigint NOT NULL,															/* The entity */
	Attribute bigint NOT NULL,														/* The attribute of the entity */
	Value nvarchar(50) NOT NULL,													/* The value of the attribute */
	FOREIGN KEY (Entity) REFERENCES Entities(ID),
	FOREIGN KEY (Attribute) REFERENCES Attributes(ID)
)
